home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
comm
/
misc
/
LogSTFax.lha
/
LogSTFax.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1999-01-06
|
2KB
|
57 lines
/*
$VER: LogSTFaxCalls.rexx 1.0 (14.9.98)
by Neil Bothwick
This logs all incoming calls to STFax, including
CallerID information where available
*/
/* Change this to the name of your logfile */
logfile = 'STFax:STFaxCalls'
options results
port = address()
address command
if getclip('STFaxRingTime') = '' then call setclip('STFaxRingTime',0)
if time(s) - getclip('STFaxRingTime') > 5 then call setclip('STFaxRingCount',0)
call setclip('STFaxRingCount',getclip('STFaxRingCount') + 1)
call setclip('STFaxRingTime',time(s))
select
/* open GUI on first ring and optionally send commands to other programs */
when getclip('STFaxRingCount') = 1 then do
address(port)
'SHOW'
address command
/* Add any commands you would like executed when the phone rings*/
/* These are the ones I use to shut off all music programs */
/*
if show('P','YACDP') = 1 then address 'YACDP' 'STOP'
if show('P','ACDPLAY') = 1 then address 'ACDPLAY' 'STOP'
if show('P','AMIGAAMP') = 1 then do
address 'AMIGAAMP'
'STATUS'
if result = 'PLAY' then 'PAUSE'
end
'Tools:Sound/tinymidiplay'
'breakname MPEGA'
*/
end
/* Wait for second ring for Caller ID information to become available */
when getclip('STFaxRingCount') = 2 then do
address(port)
'GETCALLERID'
CallerNo = result
'GETCALLERNAME' CallerNo
CallerName = result
address command
'echo >>"'logfile'"' left(date('W'),3) date('N')',' time() left(CallerNo,20) CallerName
end
otherwise nop
end
exit